﻿using Microsoft.AspNetCore.Mvc.ViewFeatures;
using Microsoft.AspNetCore.Razor.TagHelpers;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace MvcSample.Infrastructure.TagHelpers
{
    /// <summary>
    /// Bold expression tag helper.
    /// </summary>
    public class BoldExpressionTagHelper
        : TagHelper
    {
        [HtmlAttributeName("asp-for")]
        public ModelExpression AspFor { get; set; }
        public override void Process(TagHelperContext context, TagHelperOutput output)
        {
            var boldStr = AspFor.Model.ToString();
            output.TagName = "strong";
            output.Content.SetContent(boldStr);
        }
    }
}
